/PROG  PNS0189
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "WU XU LB";
PROG_SIZE	= 3268;
CREATE		= DATE 22-01-10  TIME 09:03:28;
MODIFIED	= DATE 23-02-08  TIME 09:01:04;
FILE_NAME	= PNS0062;
VERSION		= 0;
LINE_COUNT	= 112;
MEMORY_SIZE	= 3764;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0062 ;
   7:  !  PART:53379724 ;
   8:  !XEB_0728*********************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
  51:  DO[1]=OFF ;
  52:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  53:  PAYLOAD[2] ;
  54:  CALL CHK_PICK    ;
  55:   ;
  56:J P[5:PICK DEPART] 100% CNT30 ACC100    ;
  57:  MONITOR Z_CHECH ;
  58:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  59:  DO[1]=ON ;
  60:  DO[8]=PULSE,1.0sec ;
  61:  LBL[30:GOTO DROP POUNCE] ;
  62:J P[6] 100% CNT100    ;
  63:J P[14] 100% CNT100    ;
  64:J P[8:DROP POUNCE] 100% CNT10 ACC100    ;
  65:   ;
  66:  LBL[40:AT DROP POUNCE] ;
  67:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  68:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  69:  IF DI[18]=ON,JMP LBL[60] ;
  70:  JMP LBL[40] ;
  71:   ;
  72:  LBL[50:MOVE DROP SNEAK] ;
  73:  OVERRIDE=R[5] ;
  74:J P[9:DROP SNEAK] 100% CNT10 ACC100    ;
  75:  LBL[51:DROP OR C-P-S] ;
  76:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  77:  IF DI[18]=ON,JMP LBL[40] ;
  78:  JMP LBL[51] ;
  79:  JMP LBL[50] ;
  80:   ;
  81:  LBL[60:MOVE CLS-PRS-ACC] ;
  82:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  83:  PAUSE ;
  84:  JMP LBL[30] ;
  85:   ;
  86:  LBL[80:DROP ENABLED] ;
  87:  !PROCEED TO DROP ;
  88:  TIMER[4]=RESET ;
  89:  TIMER[4]=START ;
  90:   ;
  91:  DO[4]=OFF ;
  92:  OVERRIDE=R[5] ;
  93:J P[10:DROP APPROACH] 100% CNT10 ACC100    ;
  94:  MONITOR END Z_CHECH ;
  95:J P[11:DROP] 100% CNT10 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  96:  DO[6]=PULSE,1.0sec ;
  97:  PAYLOAD[1] ;
  98:  CALL CHK_DROP    ;
  99:J P[12:DROP DEPART] 100% CNT30 ACC100 TA    .50sec,DO[7]=PULSE,1.0sec    ;
 100:J P[13:DROP CLEAR] 100% CNT100 ACC100    ;
 101:  !GOTO PICK POUNCE ;
 102:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 103:  IF DI[29]=ON,JMP LBL[90] ;
 104:  JMP LBL[10] ;
 105:   ;
 106:  LBL[90:END OF CYCLE] ;
 107:  TIMER[1]=STOP ;
 108:  R[4]=TIMER[1]    ;
 109:J P[1:MIDDLE] 50% CNT100    ;
 110:  MOVE TO HOME    ;
 111:   ;
 112:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2510.766  mm,	Y =    33.725  mm,	Z =  -125.647  mm,
	W =  -175.722 deg,	P =     6.866 deg,	R =   -97.257 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1492.135  mm,	Y =  1109.254  mm,	Z =  -107.581  mm,
	W =   174.644 deg,	P =     6.064 deg,	R =  -170.884 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1619.216  mm,	Y =  2612.877  mm,	Z =   155.045  mm,
	W =   173.257 deg,	P =    -9.546 deg,	R =    91.602 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1619.215  mm,	Y =  2612.878  mm,	Z =   -28.155  mm,
	W =   173.257 deg,	P =    -9.546 deg,	R =    91.602 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1619.216  mm,	Y =  2612.877  mm,	Z =   245.445  mm,
	W =   173.257 deg,	P =    -9.546 deg,	R =    91.602 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2839.890  mm,	Y =  -703.910  mm,	Z =  -753.847  mm,
	W =  -179.728 deg,	P =      .292 deg,	R =   -87.666 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1492.134  mm,	Y =  1109.254  mm,	Z =  -107.580  mm,
	W =   174.644 deg,	P =     6.064 deg,	R =  -170.884 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2886.302  mm,	Y = -1336.745  mm,	Z =  -847.569  mm,
	W =  -179.613 deg,	P =      .129 deg,	R =   -86.402 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2743.461  mm,	Y = -2084.480  mm,	Z =  -958.056  mm,
	W =  -179.559 deg,	P =     -.105 deg,	R =   -84.822 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2618.810  mm,	Y = -3477.703  mm,	Z = -1010.309  mm,
	W =  -178.585 deg,	P =      .103 deg,	R =   -88.412 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2618.802  mm,	Y = -3477.697  mm,	Z = -1107.042  mm,
	W =  -178.585 deg,	P =      .102 deg,	R =   -88.412 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2618.802  mm,	Y = -3477.697  mm,	Z = -1084.002  mm,
	W =  -178.585 deg,	P =      .102 deg,	R =   -88.412 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2640.131  mm,	Y =  -883.904  mm,	Z =  -997.757  mm,
	W =  -179.266 deg,	P =     -.420 deg,	R =   -86.981 deg
};
P[14]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2886.302  mm,	Y = -1336.745  mm,	Z =  -847.569  mm,
	W =  -179.613 deg,	P =      .129 deg,	R =   -86.402 deg
};
/END
